﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.DB;
using RevitProject.SpaceManager.Factory;
namespace RevitProject.REnvironment
{
    public static class DefinitionInfo
    {
        private static DefinitionFile instance;

        /// <summary>
        /// 获取共享参数文件
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        public static DefinitionFile GetDefinitionFile(Document doc)
        {
            if (instance == null)
            {
                var path = ShareFactory.GetShareParaPath();
                doc.Application.SharedParametersFilename = path;
                instance = doc.Application.OpenSharedParameterFile();
            }

            return instance;

        }


    }
}
